package com.daiyang.campus_lucky_draw;

import com.daiyang.campus_lucky_draw.common.enums.ActivityPrizeStatusEnum;
import com.daiyang.campus_lucky_draw.common.enums.ActivityStatusEnum;
import com.daiyang.campus_lucky_draw.common.enums.ActivityUserStatusEnum;
import com.daiyang.campus_lucky_draw.contreller.param.DrawPrizeParam;
import com.daiyang.campus_lucky_draw.service.activitystatus.ActivityStatusManager;
import com.daiyang.campus_lucky_draw.service.dto.ConvertActivityStatusDTO;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@SpringBootTest
public class StatusConvert {
    @Autowired
    ActivityStatusManager activityStatusManager;
    @Test
    void convertStatusTest() {
        ConvertActivityStatusDTO convertActivityStatusDTO=new ConvertActivityStatusDTO();
        convertActivityStatusDTO.setActivityId(58L);
        convertActivityStatusDTO.setTargetActivityStatus(ActivityStatusEnum.COMPLETED);
        convertActivityStatusDTO.setPrizeId(28L);
        convertActivityStatusDTO.setTargetPrizeStatus(ActivityPrizeStatusEnum.COMPLETED);
        List<Long> userIds= Arrays.asList(62L);
        convertActivityStatusDTO.setUserIds(userIds);
        convertActivityStatusDTO.setTargetUserStatus(ActivityUserStatusEnum.COMPLETED);
        activityStatusManager.handlerEvent(convertActivityStatusDTO);
    }
}
